<?php
namespace app\admin\model;
use think\Db;
use think\Model;

class InvoiceModel extends Model
{
	 public function __construct()
    {
        parent::__construct();

    }
    public function getInvoiceList($page,$limit,$map=array(),$field='*')
    {
    	return Db::name('invoice_common')->page($page,$limit)->where($map)->order('invoice_common_id desc')->field($field)->select();
    }
    public function getInvoiceById($id,$field='*')
    {
        return Db::name('invoice_common')->where('invoice_common_id='.$id)->field($field)->find();
    }

    public function updateInvoice($map,$data)
    {
        return Db::name('invoice_common')->where($map)->update($data);
    }


}
